import os.path
import sys

from bin.system import System


def run(settings):
    command_parameters = sys.argv
    if len(command_parameters) < 4:
        print('缺少参数')
        return

    file1 = command_parameters[1].strip()
    file2 = command_parameters[2].strip()
    file3 = command_parameters[3].strip()

    # print(f'【放假规律表】 {file1}')
    # print(f'【请假汇总表】 {file2}')
    # print(f'【工时汇总表】 {file3}')
    # print('')

    files = [
        os.path.join(settings.input_path, file1),
        os.path.join(settings.input_path, file2),
        os.path.join(settings.input_path, file3),
    ]

    system = System(settings)
    system.start(files)
    system.exec()
    system.close()
